#ifndef __LEADERSHIP_BEHAVIOUR_H__
#define __LEADERSHIP_BEHAVIOUR_H__

#include "../ModuleInterface.h"

/*
 * Spravanie veduceho hry (koncepcia navrhnuta loptosmi)
 */

class LeadershipBehaviour : public ModuleInterface
{
public:
	LeadershipBehaviour();
	void SendZmenaFormacieLeaderMSG();
	void SendTySiLeaderMSG(int uniformNumber);
	void SendLeaderMSG();
	void ProcessLeaderMSG(int time, int uniform, const char* msg);
	bool GetAmILeader();
	int GetLeaderUniform();
private:
	void SendZmenaFormaciePlayerMSG();
	void SendOkSomLeaderMSG();

	void ZakodujSimCas(int cas, char s[3]) { s[0] = 'A' + cas / (26*26); cas %= 26*26; s[1] = 'A' + cas / 26; cas %= 26; s[2] = 'A' + cas; }
	int OdkodujSimCas(const char s[3]) { return (s[0]-'A')*26*26 + (s[1]-'A')*26 + (s[2]-'A'); }

};

#endif
